package com.mms.service;

import com.mms.dao.PersonManagementDao;
import com.mms.entity.Staff;

public class StaffServiceImp implements StaffService {

    private PersonManagementDao personManagementDao;
    public PersonManagementDao getPersonManagementDao() {
        return personManagementDao;
    }
    public void setPersonManagementDao(PersonManagementDao personManagementDao) {
        this.personManagementDao = personManagementDao;
    }
    
    
    @Override
    public boolean registerStaff(Staff staff) {
        if (personManagementDao.registerStaff(staff)) {
            return true;
        }
        return false;
    }
    @Override
    public int checkUser(String userName, String password) {
        return personManagementDao.checkUser(userName, password);
    }
    @Override
    public boolean validateState(int staffID) {
        return personManagementDao.validateState(staffID);
    }
    @Override
    public boolean isAdminister(int staffID) {
        return personManagementDao.isAdminister(staffID);
    }
    @Override
    public boolean isUserExist(String userName) {
        return personManagementDao.isUserExist(userName);
    }

}
